/*******************************************************************************
 * @brief: USB
 * @Author:   aple
 * @Date: 2022-10-29 10:27:22
 * @LastEditors: aple
 * @LastEditTime: 2022-10-29 13:08:15
 * @Verision: 1.0.0.0
 ******************************************************************************/
#include "mytype.h"
#include "pincfg.h"
#include "os_obj.h"
#include "common.h"
#include "usb_host_iap.h"

/*****************************************************************************
 * @brief   fun.
 *****************************************************************************/
void usb_task(void *argument);

/******************************************************************************
 * @brief   modbus task creat.
 * @param   argv
 * @return  none
 * @ Pass/ Fail criteria: none
 *****************************************************************************/
void usb_task_creat(void)
{
	static uu64 stk[2048 / 8];
	static struct rt_thread tcb;

	rt_thread_init(
		&tcb, "usb",
		usb_task, "argv",
		stk, sizeof(stk),
		PRIO_BELOW_MIDDLE, 10);

	rt_thread_startup(&tcb);
}
//obj_init_order5(usb_task_creat);

/*****************************************************************************
 * @brief   key_task
 * @param   none
 * @return  none
 * @ Pass/ Fail criteria: none
 *****************************************************************************/
void usb_task(void *argument)
{
    /* IAP initialization */
    IAP_Initialization( );

	while (1)
	{
		osDelay(2);
        IAP_Main_Deal( );
	}
}
